//
//  LZUserModel.h
//  laziz_Consumer
//
//  Created by ZhaoDongBo on 2016/11/10.
//  Copyright © 2016年 XBN. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "LZUserInfoPresenter.h"
#import "LZCurrentUserInfo.h"

typedef NS_ENUM(NSInteger ,UserLoginType) {
    UserLoginType_Fast ,    // 快捷登录
    UserLoginType_Phone,    // 手机号登录
    UserLoginType_eMail,    // 邮箱登录
    UserLoginType_Facebook, // facebook登录
    UserLoginType_Twitter   // twitter登录
};

@interface LZUserModel : NSObject

@property (nonatomic, strong) LZUserInfoPresenter * api;
@property (nonatomic, assign) UserLoginType  loginType;
@property (nonatomic, strong) NSString * userId;
@property (nonatomic, strong) NSString * userToken;
@property (nonatomic, strong) LZCurrentUserInfo *userInfo;

+ (instancetype)Instance;

//判断是否登陆
- (BOOL)isLogin;

//注销登陆
- (void)logOut;

//保存用户信息
- (void)saveUserInfo:(LZCurrentUserInfo *)userInfo;

////更新用户信息
- (void)updateUserInfoIfNeeded;

@end
